﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Touchscreen.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<% 
Touchscreen.FilmManager filmManager = new Touchscreen.FilmManager();
List<Touchscreen.Film> films;
films = filmManager.GetUpComingFlims();
int count = 0;
foreach (Touchscreen.Film f in films)
{
    if (count < 5)
    {
        LabelTitle.Text = f.title;
        LabelTime.Text = "Start tijd: " + f.startTime.ToShortTimeString();
        LabelRoom.Text = "Zaal: " + f.room.ToString();
        ImagePreview.ImageUrl = ImageFolder + f.image;
        LabelLanguage.Text = "Taal: ";
        ImageLanguage.ImageUrl = FlagsFolder + f.language + ".gif";
        LabelSubtitles.Text = "Ondertiteling: ";
        ImageSubtitles.ImageUrl = FlagsFolder + f.subtitles + ".gif";
        ImageButtonTransparent.PostBackUrl = "Stap2.aspx?FilmName=" + f.title + "&DatumTijd=" + f.startTime +
    "&ZaalNummer=" + f.room + "&Adult=0&Child=0&OldPeople=0&Student=0&3D=0";
        
        if (f.dried == false)
        {
            ImageParentGuide.Visible = false;
        }
        else
        {
            ImageParentGuide.Visible = true;
        } 
         
%>
<div class="FilmChoice">
    <div class="FilmTitle">
        <asp:Label ID="LabelTitle" CssClass="FilmTilteText" runat="server" Text="Title"></asp:Label>
    </div>
    <div class="FilmTimeAndPlace">
        <asp:Label ID="LabelTime" CssClass="FloatLeft" runat="server" Text="Start tijd: tijd"></asp:Label>
        <asp:Label ID="LabelRoom" CssClass="FloatRight" runat="server" Text="Zaal: x"></asp:Label>
    </div>
    <div class="FilmPreviewImage">
        <asp:Image ID="ImagePreview" runat="server" 
            ImageUrl="~/App_Themes/Images/blackswan3.jpg" Height="200px" 
            Width="163px" />
    </div>
    <div class="FilmLanguage">
        <asp:Label ID="LabelLanguage" CssClass="FloatLeft" runat="server" Text="Taal:"></asp:Label>
        <asp:Image ID="ImageLanguage" runat="server" 
            ImageUrl="~/App_Themes/Images/Flags/EN.gif" CssClass="Flag" />
    </div>
    <div class="FilmSubtitles">
        <asp:Label ID="LabelSubtitles" CssClass="FloatLeft" runat="server" Text="Ondertiteling:"></asp:Label>
        <asp:Image ID="ImageSubtitles" runat="server" ImageUrl="~/App_Themes/Images/Flags/NL.gif" CssClass="Flag" />
    </div>
    
    <div class="FilmParentGuide">
        <asp:Image ID="ImageParentGuide" runat="server" Height="24px" 
            ImageUrl="~/App_Themes/Images/3d.png" Width="24px" />
    </div>
</div>
<div class="FilmClickHandler">
    <asp:ImageButton ID="ImageButtonTransparent" runat="server" 
        ImageUrl="~/App_Themes/Images/transparent.png" Height="100%" Width="100%" 
        PostBackUrl="?FilmID="/>
</div>
<% }
    count++;
} %>

</asp:Content>
